\(\int \frac {\cos ^4(c+d x)}{(a+b \tan ^2(c+d x))^2} \, dx\) [473]
Optimal result
Integrand size = 23, antiderivative size = 212 \[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\left (3 a^2-14 a b+35 b^2\right ) x}{8 (a-b)^4}-\frac {(7 a-b) b^{5/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} (a-b)^4 d}+\frac {3 (a-3 b) \cos (c+d x) \sin (c+d x)}{8 (a-b)^2 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}+\frac {(a-4 b) b (3 a+b) \tan (c+d x)}{8 a (a-b)^3 d \left (a+b \tan ^2(c+d x)\right )}
\]
[Out]
1/8*(3*a^2-14*a*b+35*b^2)*x/(a-b)^4-1/2*(7*a-b)*b^(5/2)*arctan(b^(1/2)*tan(d*x+c)/a^(1/2))/a^(3/2)/(a-b)^4/d+3
/8*(a-3*b)*cos(d*x+c)*sin(d*x+c)/(a-b)^2/d/(a+b*tan(d*x+c)^2)+1/4*cos(d*x+c)^3*sin(d*x+c)/(a-b)/d/(a+b*tan(d*x
+c)^2)+1/8*(a-4*b)*b*(3*a+b)*tan(d*x+c)/a/(a-b)^3/d/(a+b*tan(d*x+c)^2)
Rubi [A] (verified)
Time = 0.34 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.00, number of
steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3756, 425, 541, 536, 209, 211}
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=-\frac {b^{5/2} (7 a-b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} d (a-b)^4}+\frac {x \left (3 a^2-14 a b+35 b^2\right )}{8 (a-b)^4}+\frac {b (a-4 b) (3 a+b) \tan (c+d x)}{8 a d (a-b)^3 \left (a+b \tan ^2(c+d x)\right )}+\frac {\sin (c+d x) \cos ^3(c+d x)}{4 d (a-b) \left (a+b \tan ^2(c+d x)\right )}+\frac {3 (a-3 b) \sin (c+d x) \cos (c+d x)}{8 d (a-b)^2 \left (a+b \tan ^2(c+d x)\right )}
\]
[In]
Int[Cos[c + d*x]^4/(a + b*Tan[c + d*x]^2)^2,x]
[Out]
((3*a^2 - 14*a*b + 35*b^2)*x)/(8*(a - b)^4) - ((7*a - b)*b^(5/2)*ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]])/(2*a^
(3/2)*(a - b)^4*d) + (3*(a - 3*b)*Cos[c + d*x]*Sin[c + d*x])/(8*(a - b)^2*d*(a + b*Tan[c + d*x]^2)) + (Cos[c +
d*x]^3*Sin[c + d*x])/(4*(a - b)*d*(a + b*Tan[c + d*x]^2)) + ((a - 4*b)*b*(3*a + b)*Tan[c + d*x])/(8*a*(a - b)
^3*d*(a + b*Tan[c + d*x]^2))
Rule 209
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 425
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]
Rule 536
Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]
Rule 541
Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]
Rule 3756
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])
Rubi steps \begin{align*}
\text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right )^3 \left (a+b x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {-3 a+4 b-5 b x^2}{\left (1+x^2\right )^2 \left (a+b x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{4 (a-b) d} \\ & = \frac {3 (a-3 b) \cos (c+d x) \sin (c+d x)}{8 (a-b)^2 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {3 a^2-5 a b+8 b^2+9 (a-3 b) b x^2}{\left (1+x^2\right ) \left (a+b x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{8 (a-b)^2 d} \\ & = \frac {3 (a-3 b) \cos (c+d x) \sin (c+d x)}{8 (a-b)^2 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}+\frac {(a-4 b) b (3 a+b) \tan (c+d x)}{8 a (a-b)^3 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {2 \left (3 a^3-11 a^2 b+24 a b^2-4 b^3\right )+2 (a-4 b) b (3 a+b) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (c+d x)\right )}{16 a (a-b)^3 d} \\ & = \frac {3 (a-3 b) \cos (c+d x) \sin (c+d x)}{8 (a-b)^2 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}+\frac {(a-4 b) b (3 a+b) \tan (c+d x)}{8 a (a-b)^3 d \left (a+b \tan ^2(c+d x)\right )}-\frac {\left ((7 a-b) b^3\right ) \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (c+d x)\right )}{2 a (a-b)^4 d}+\frac {\left (3 a^2-14 a b+35 b^2\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{8 (a-b)^4 d} \\ & = \frac {\left (3 a^2-14 a b+35 b^2\right ) x}{8 (a-b)^4}-\frac {(7 a-b) b^{5/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} (a-b)^4 d}+\frac {3 (a-3 b) \cos (c+d x) \sin (c+d x)}{8 (a-b)^2 d \left (a+b \tan ^2(c+d x)\right )}+\frac {\cos ^3(c+d x) \sin (c+d x)}{4 (a-b) d \left (a+b \tan ^2(c+d x)\right )}+\frac {(a-4 b) b (3 a+b) \tan (c+d x)}{8 a (a-b)^3 d \left (a+b \tan ^2(c+d x)\right )} \\
\end{align*}
Mathematica [A] (verified)
Time = 3.26 (sec) , antiderivative size = 148, normalized size of antiderivative = 0.70
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {4 \left (3 a^2-14 a b+35 b^2\right ) (c+d x)+\frac {16 b^{5/2} (-7 a+b) \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{a^{3/2}}+8 (a-3 b) (a-b) \sin (2 (c+d x))-\frac {16 (a-b) b^3 \sin (2 (c+d x))}{a (a+b+(a-b) \cos (2 (c+d x)))}+(a-b)^2 \sin (4 (c+d x))}{32 (a-b)^4 d}
\]
[In]
Integrate[Cos[c + d*x]^4/(a + b*Tan[c + d*x]^2)^2,x]
[Out]
(4*(3*a^2 - 14*a*b + 35*b^2)*(c + d*x) + (16*b^(5/2)*(-7*a + b)*ArcTan[(Sqrt[b]*Tan[c + d*x])/Sqrt[a]])/a^(3/2
) + 8*(a - 3*b)*(a - b)*Sin[2*(c + d*x)] - (16*(a - b)*b^3*Sin[2*(c + d*x)])/(a*(a + b + (a - b)*Cos[2*(c + d*
x)])) + (a - b)^2*Sin[4*(c + d*x)])/(32*(a - b)^4*d)
Maple [A] (verified)
Time = 15.26 (sec) , antiderivative size = 173, normalized size of antiderivative =
0.82
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {-\frac {b^{3} \left (\frac {\left (a -b \right ) \tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\left (7 a -b \right ) \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}\right )}{\left (a -b \right )^{4}}+\frac {\frac {\left (\frac {3}{8} a^{2}-\frac {7}{4} a b +\frac {11}{8} b^{2}\right ) \tan \left (d x +c \right )^{3}+\left (-\frac {9}{4} a b +\frac {13}{8} b^{2}+\frac {5}{8} a^{2}\right ) \tan \left (d x +c \right )}{\left (1+\tan \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}-14 a b +35 b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{8}}{\left (a -b \right )^{4}}}{d}\) |
\(173\) |
default |
\(\frac {-\frac {b^{3} \left (\frac {\left (a -b \right ) \tan \left (d x +c \right )}{2 a \left (a +b \tan \left (d x +c \right )^{2}\right )}+\frac {\left (7 a -b \right ) \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}\right )}{\left (a -b \right )^{4}}+\frac {\frac {\left (\frac {3}{8} a^{2}-\frac {7}{4} a b +\frac {11}{8} b^{2}\right ) \tan \left (d x +c \right )^{3}+\left (-\frac {9}{4} a b +\frac {13}{8} b^{2}+\frac {5}{8} a^{2}\right ) \tan \left (d x +c \right )}{\left (1+\tan \left (d x +c \right )^{2}\right )^{2}}+\frac {\left (3 a^{2}-14 a b +35 b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{8}}{\left (a -b \right )^{4}}}{d}\) |
\(173\) |
risch |
\(\frac {3 x \,a^{2}}{8 \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )^{2}}-\frac {7 x a b}{4 \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )^{2}}+\frac {35 x \,b^{2}}{8 \left (a^{2}-2 a b +b^{2}\right ) \left (a -b \right )^{2}}-\frac {i {\mathrm e}^{4 i \left (d x +c \right )}}{64 \left (a -b \right )^{2} d}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a}{8 \left (a -b \right )^{3} d}+\frac {3 i {\mathrm e}^{2 i \left (d x +c \right )} b}{8 \left (a -b \right )^{3} d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}-\frac {3 i {\mathrm e}^{-2 i \left (d x +c \right )} b}{8 d \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}+\frac {i {\mathrm e}^{-4 i \left (d x +c \right )}}{64 \left (a^{2}-2 a b +b^{2}\right ) d}+\frac {i b^{3} \left (a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}+a -b \right )}{d \left (-a +b \right )^{2} a \left (a^{2}-2 a b +b^{2}\right ) \left (-a \,{\mathrm e}^{4 i \left (d x +c \right )}+b \,{\mathrm e}^{4 i \left (d x +c \right )}-2 a \,{\mathrm e}^{2 i \left (d x +c \right )}-2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-a +b \right )}+\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a \left (a -b \right )^{4} d}-\frac {\sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{4 a^{2} \left (a -b \right )^{4} d}-\frac {7 \sqrt {-a b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a \left (a -b \right )^{4} d}+\frac {\sqrt {-a b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{4 a^{2} \left (a -b \right )^{4} d}\) |
\(596\) |
| | |
|
|
|
[In]
int(cos(d*x+c)^4/(a+b*tan(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
[Out]
1/d*(-b^3/(a-b)^4*(1/2/a*(a-b)*tan(d*x+c)/(a+b*tan(d*x+c)^2)+1/2*(7*a-b)/a/(a*b)^(1/2)*arctan(b*tan(d*x+c)/(a*
b)^(1/2)))+1/(a-b)^4*(((3/8*a^2-7/4*a*b+11/8*b^2)*tan(d*x+c)^3+(-9/4*a*b+13/8*b^2+5/8*a^2)*tan(d*x+c))/(1+tan(
d*x+c)^2)^2+1/8*(3*a^2-14*a*b+35*b^2)*arctan(tan(d*x+c))))
Fricas [A] (verification not implemented)
none
Time = 0.34 (sec) , antiderivative size = 801, normalized size of antiderivative = 3.78
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\left [\frac {{\left (3 \, a^{4} - 17 \, a^{3} b + 49 \, a^{2} b^{2} - 35 \, a b^{3}\right )} d x \cos \left (d x + c\right )^{2} + {\left (3 \, a^{3} b - 14 \, a^{2} b^{2} + 35 \, a b^{3}\right )} d x - {\left (7 \, a b^{3} - b^{4} + {\left (7 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (a^{2} + a b\right )} \cos \left (d x + c\right )^{3} - a b \cos \left (d x + c\right )\right )} \sqrt {-\frac {b}{a}} \sin \left (d x + c\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right ) + {\left (2 \, {\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} \cos \left (d x + c\right )^{5} + 3 \, {\left (a^{4} - 5 \, a^{3} b + 7 \, a^{2} b^{2} - 3 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{3} b - 14 \, a^{2} b^{2} + 7 \, a b^{3} + 4 \, b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, {\left ({\left (a^{6} - 5 \, a^{5} b + 10 \, a^{4} b^{2} - 10 \, a^{3} b^{3} + 5 \, a^{2} b^{4} - a b^{5}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 4 \, a^{4} b^{2} + 6 \, a^{3} b^{3} - 4 \, a^{2} b^{4} + a b^{5}\right )} d\right )}}, \frac {{\left (3 \, a^{4} - 17 \, a^{3} b + 49 \, a^{2} b^{2} - 35 \, a b^{3}\right )} d x \cos \left (d x + c\right )^{2} + {\left (3 \, a^{3} b - 14 \, a^{2} b^{2} + 35 \, a b^{3}\right )} d x + 2 \, {\left (7 \, a b^{3} - b^{4} + {\left (7 \, a^{2} b^{2} - 8 \, a b^{3} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (d x + c\right )^{2} - b\right )} \sqrt {\frac {b}{a}}}{2 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) + {\left (2 \, {\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} \cos \left (d x + c\right )^{5} + 3 \, {\left (a^{4} - 5 \, a^{3} b + 7 \, a^{2} b^{2} - 3 \, a b^{3}\right )} \cos \left (d x + c\right )^{3} + {\left (3 \, a^{3} b - 14 \, a^{2} b^{2} + 7 \, a b^{3} + 4 \, b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, {\left ({\left (a^{6} - 5 \, a^{5} b + 10 \, a^{4} b^{2} - 10 \, a^{3} b^{3} + 5 \, a^{2} b^{4} - a b^{5}\right )} d \cos \left (d x + c\right )^{2} + {\left (a^{5} b - 4 \, a^{4} b^{2} + 6 \, a^{3} b^{3} - 4 \, a^{2} b^{4} + a b^{5}\right )} d\right )}}\right ]
\]
[In]
integrate(cos(d*x+c)^4/(a+b*tan(d*x+c)^2)^2,x, algorithm="fricas")
[Out]
[1/8*((3*a^4 - 17*a^3*b + 49*a^2*b^2 - 35*a*b^3)*d*x*cos(d*x + c)^2 + (3*a^3*b - 14*a^2*b^2 + 35*a*b^3)*d*x -
(7*a*b^3 - b^4 + (7*a^2*b^2 - 8*a*b^3 + b^4)*cos(d*x + c)^2)*sqrt(-b/a)*log(((a^2 + 6*a*b + b^2)*cos(d*x + c)^
4 - 2*(3*a*b + b^2)*cos(d*x + c)^2 - 4*((a^2 + a*b)*cos(d*x + c)^3 - a*b*cos(d*x + c))*sqrt(-b/a)*sin(d*x + c)
+ b^2)/((a^2 - 2*a*b + b^2)*cos(d*x + c)^4 + 2*(a*b - b^2)*cos(d*x + c)^2 + b^2)) + (2*(a^4 - 3*a^3*b + 3*a^2
*b^2 - a*b^3)*cos(d*x + c)^5 + 3*(a^4 - 5*a^3*b + 7*a^2*b^2 - 3*a*b^3)*cos(d*x + c)^3 + (3*a^3*b - 14*a^2*b^2
+ 7*a*b^3 + 4*b^4)*cos(d*x + c))*sin(d*x + c))/((a^6 - 5*a^5*b + 10*a^4*b^2 - 10*a^3*b^3 + 5*a^2*b^4 - a*b^5)*
d*cos(d*x + c)^2 + (a^5*b - 4*a^4*b^2 + 6*a^3*b^3 - 4*a^2*b^4 + a*b^5)*d), 1/8*((3*a^4 - 17*a^3*b + 49*a^2*b^2
- 35*a*b^3)*d*x*cos(d*x + c)^2 + (3*a^3*b - 14*a^2*b^2 + 35*a*b^3)*d*x + 2*(7*a*b^3 - b^4 + (7*a^2*b^2 - 8*a*
b^3 + b^4)*cos(d*x + c)^2)*sqrt(b/a)*arctan(1/2*((a + b)*cos(d*x + c)^2 - b)*sqrt(b/a)/(b*cos(d*x + c)*sin(d*x
+ c))) + (2*(a^4 - 3*a^3*b + 3*a^2*b^2 - a*b^3)*cos(d*x + c)^5 + 3*(a^4 - 5*a^3*b + 7*a^2*b^2 - 3*a*b^3)*cos(
d*x + c)^3 + (3*a^3*b - 14*a^2*b^2 + 7*a*b^3 + 4*b^4)*cos(d*x + c))*sin(d*x + c))/((a^6 - 5*a^5*b + 10*a^4*b^2
- 10*a^3*b^3 + 5*a^2*b^4 - a*b^5)*d*cos(d*x + c)^2 + (a^5*b - 4*a^4*b^2 + 6*a^3*b^3 - 4*a^2*b^4 + a*b^5)*d)]
Sympy [F(-1)]
Timed out. \[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\text {Timed out}
\]
[In]
integrate(cos(d*x+c)**4/(a+b*tan(d*x+c)**2)**2,x)
[Out]
Timed out
Maxima [A] (verification not implemented)
none
Time = 0.32 (sec) , antiderivative size = 355, normalized size of antiderivative = 1.67
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\frac {\frac {{\left (3 \, a^{2} - 14 \, a b + 35 \, b^{2}\right )} {\left (d x + c\right )}}{a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}} - \frac {4 \, {\left (7 \, a b^{3} - b^{4}\right )} \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{{\left (a^{5} - 4 \, a^{4} b + 6 \, a^{3} b^{2} - 4 \, a^{2} b^{3} + a b^{4}\right )} \sqrt {a b}} + \frac {{\left (3 \, a^{2} b - 11 \, a b^{2} - 4 \, b^{3}\right )} \tan \left (d x + c\right )^{5} + {\left (3 \, a^{3} - 6 \, a^{2} b - 13 \, a b^{2} - 8 \, b^{3}\right )} \tan \left (d x + c\right )^{3} + {\left (5 \, a^{3} - 13 \, a^{2} b - 4 \, b^{3}\right )} \tan \left (d x + c\right )}{{\left (a^{4} b - 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} - a b^{4}\right )} \tan \left (d x + c\right )^{6} + a^{5} - 3 \, a^{4} b + 3 \, a^{3} b^{2} - a^{2} b^{3} + {\left (a^{5} - a^{4} b - 3 \, a^{3} b^{2} + 5 \, a^{2} b^{3} - 2 \, a b^{4}\right )} \tan \left (d x + c\right )^{4} + {\left (2 \, a^{5} - 5 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3} - a b^{4}\right )} \tan \left (d x + c\right )^{2}}}{8 \, d}
\]
[In]
integrate(cos(d*x+c)^4/(a+b*tan(d*x+c)^2)^2,x, algorithm="maxima")
[Out]
1/8*((3*a^2 - 14*a*b + 35*b^2)*(d*x + c)/(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4) - 4*(7*a*b^3 - b^4)*arcta
n(b*tan(d*x + c)/sqrt(a*b))/((a^5 - 4*a^4*b + 6*a^3*b^2 - 4*a^2*b^3 + a*b^4)*sqrt(a*b)) + ((3*a^2*b - 11*a*b^2
- 4*b^3)*tan(d*x + c)^5 + (3*a^3 - 6*a^2*b - 13*a*b^2 - 8*b^3)*tan(d*x + c)^3 + (5*a^3 - 13*a^2*b - 4*b^3)*ta
n(d*x + c))/((a^4*b - 3*a^3*b^2 + 3*a^2*b^3 - a*b^4)*tan(d*x + c)^6 + a^5 - 3*a^4*b + 3*a^3*b^2 - a^2*b^3 + (a
^5 - a^4*b - 3*a^3*b^2 + 5*a^2*b^3 - 2*a*b^4)*tan(d*x + c)^4 + (2*a^5 - 5*a^4*b + 3*a^3*b^2 + a^2*b^3 - a*b^4)
*tan(d*x + c)^2))/d
Giac [A] (verification not implemented)
none
Time = 0.64 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.27
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=-\frac {\frac {4 \, b^{3} \tan \left (d x + c\right )}{{\left (a^{4} - 3 \, a^{3} b + 3 \, a^{2} b^{2} - a b^{3}\right )} {\left (b \tan \left (d x + c\right )^{2} + a\right )}} - \frac {{\left (3 \, a^{2} - 14 \, a b + 35 \, b^{2}\right )} {\left (d x + c\right )}}{a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}} + \frac {4 \, {\left (7 \, a b^{3} - b^{4}\right )} {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )\right )}}{{\left (a^{5} - 4 \, a^{4} b + 6 \, a^{3} b^{2} - 4 \, a^{2} b^{3} + a b^{4}\right )} \sqrt {a b}} - \frac {3 \, a \tan \left (d x + c\right )^{3} - 11 \, b \tan \left (d x + c\right )^{3} + 5 \, a \tan \left (d x + c\right ) - 13 \, b \tan \left (d x + c\right )}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (\tan \left (d x + c\right )^{2} + 1\right )}^{2}}}{8 \, d}
\]
[In]
integrate(cos(d*x+c)^4/(a+b*tan(d*x+c)^2)^2,x, algorithm="giac")
[Out]
-1/8*(4*b^3*tan(d*x + c)/((a^4 - 3*a^3*b + 3*a^2*b^2 - a*b^3)*(b*tan(d*x + c)^2 + a)) - (3*a^2 - 14*a*b + 35*b
^2)*(d*x + c)/(a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4) + 4*(7*a*b^3 - b^4)*(pi*floor((d*x + c)/pi + 1/2)*sg
n(b) + arctan(b*tan(d*x + c)/sqrt(a*b)))/((a^5 - 4*a^4*b + 6*a^3*b^2 - 4*a^2*b^3 + a*b^4)*sqrt(a*b)) - (3*a*ta
n(d*x + c)^3 - 11*b*tan(d*x + c)^3 + 5*a*tan(d*x + c) - 13*b*tan(d*x + c))/((a^3 - 3*a^2*b + 3*a*b^2 - b^3)*(t
an(d*x + c)^2 + 1)^2))/d
Mupad [B] (verification not implemented)
Time = 17.19 (sec) , antiderivative size = 5272, normalized size of antiderivative = 24.87
\[
\int \frac {\cos ^4(c+d x)}{\left (a+b \tan ^2(c+d x)\right )^2} \, dx=\text {Too large to display}
\]
[In]
int(cos(c + d*x)^4/(a + b*tan(c + d*x)^2)^2,x)
[Out]
- ((tan(c + d*x)^5*(11*a*b^2 - 3*a^2*b + 4*b^3))/(8*a*(3*a*b^2 - 3*a^2*b + a^3 - b^3)) + (tan(c + d*x)^3*(13*a
*b^2 + 6*a^2*b - 3*a^3 + 8*b^3))/(8*a*(a - b)*(a^2 - 2*a*b + b^2)) + (tan(c + d*x)*(13*a^2*b - 5*a^3 + 4*b^3))
/(8*a*(a - b)*(a^2 - 2*a*b + b^2)))/(d*(a + b*tan(c + d*x)^6 + tan(c + d*x)^2*(2*a + b) + tan(c + d*x)^4*(a +
2*b))) - (atan(((((((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8
+ 1197*a^7*b^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11
+ a^2*b^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) - (tan
(c + d*x)*(a^2*3i - a*b*14i + b^2*35i)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*
b^7 + 3584*a^7*b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(512*(a^4 - 4*a^3*b - 4*a*b^
3 + b^4 + 6*a^2*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i -
a*b*14i + b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) - (tan(c + d*x)*(16*b^9 - 224*a*b^8 + 200
9*a^2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15
*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*14i + b^2*35i)*1i)/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*
a^2*b^2)) - (((((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1
197*a^7*b^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a
^2*b^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) + (tan(c +
d*x)*(a^2*3i - a*b*14i + b^2*35i)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7
+ 3584*a^7*b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(512*(a^4 - 4*a^3*b - 4*a*b^3 +
b^4 + 6*a^2*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*
14i + b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) + (tan(c + d*x)*(16*b^9 - 224*a*b^8 + 2009*a^
2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4
*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*14i + b^2*35i)*1i)/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*
b^2)))/((((((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1197*
a^7*b^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^2*b
^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) - (tan(c + d*x
)*(a^2*3i - a*b*14i + b^2*35i)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 + 35
84*a^7*b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(512*(a^4 - 4*a^3*b - 4*a*b^3 + b^4
+ 6*a^2*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*14i
+ b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) - (tan(c + d*x)*(16*b^9 - 224*a*b^8 + 2009*a^2*b^
7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4
- 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*14i + b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) -
((651*a*b^9)/64 - (35*b^10)/16 + (1275*a^2*b^8)/32 - (451*a^3*b^7)/16 + (267*a^4*b^6)/32 - (63*a^5*b^5)/64)/(
9*a^10*b - a^11 + a^2*b^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*
a^9*b^2) + (((((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 11
97*a^7*b^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^
2*b^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) + (tan(c +
d*x)*(a^2*3i - a*b*14i + b^2*35i)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 +
3584*a^7*b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(512*(a^4 - 4*a^3*b - 4*a*b^3 + b
^4 + 6*a^2*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*1
4i + b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) + (tan(c + d*x)*(16*b^9 - 224*a*b^8 + 2009*a^2
*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*
b^4 - 20*a^5*b^3 + 15*a^6*b^2)))*(a^2*3i - a*b*14i + b^2*35i))/(16*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)
)))*(a^2*3i - a*b*14i + b^2*35i)*1i)/(8*d*(a^4 - 4*a^3*b - 4*a*b^3 + b^4 + 6*a^2*b^2)) - (atan(((((tan(c + d*x
)*(16*b^9 - 224*a*b^8 + 2009*a^2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6*a^7*b
+ a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)) - ((7*a - b)*(-a^3*b^5)^(1/2)*((2*a*b^13 - 28*
a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1197*a^7*b^7 - 765*a^8*b^6 + 336
*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^2*b^9 - 9*a^3*b^8 + 36*a^4*b^7
- 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) - (tan(c + d*x)*(7*a - b)*(-a^3*b^5)^(1/2
)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 + 3584*a^7*b^6 - 7168*a^8*b^5 + 5
120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(128*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)*(a^8 - 6*a
^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2))))/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3
+ 6*a^5*b^2)))*(7*a - b)*(-a^3*b^5)^(1/2)*1i)/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)) + (((tan(c
+ d*x)*(16*b^9 - 224*a*b^8 + 2009*a^2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^3))/(32*(a^8 - 6
*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)) + ((7*a - b)*(-a^3*b^5)^(1/2)*((2*a*b^13
- 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1197*a^7*b^7 - 765*a^8*b^6
+ 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^2*b^9 - 9*a^3*b^8 + 36*a
^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) + (tan(c + d*x)*(7*a - b)*(-a^3*b^5
)^(1/2)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 + 3584*a^7*b^6 - 7168*a^8*b
^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(128*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)*(a^8
- 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2))))/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^
4*b^3 + 6*a^5*b^2)))*(7*a - b)*(-a^3*b^5)^(1/2)*1i)/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)))/(((
651*a*b^9)/64 - (35*b^10)/16 + (1275*a^2*b^8)/32 - (451*a^3*b^7)/16 + (267*a^4*b^6)/32 - (63*a^5*b^5)/64)/(9*a
^10*b - a^11 + a^2*b^9 - 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9
*b^2) + (((tan(c + d*x)*(16*b^9 - 224*a*b^8 + 2009*a^2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6*b^
3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)) - ((7*a - b)*(-a^3*b^5)^
(1/2)*((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1197*a^7*b
^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^2*b^9 -
9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) - (tan(c + d*x)*(7*
a - b)*(-a^3*b^5)^(1/2)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 + 3584*a^7*
b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(128*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 +
6*a^5*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2))))/(4*(a^7 - 4*a^6*b
+ a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)))*(7*a - b)*(-a^3*b^5)^(1/2))/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a
^5*b^2)) - (((tan(c + d*x)*(16*b^9 - 224*a*b^8 + 2009*a^2*b^7 - 980*a^3*b^6 + 406*a^4*b^5 - 84*a^5*b^4 + 9*a^6
*b^3))/(32*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2)) + ((7*a - b)*(-a^3*b^
5)^(1/2)*((2*a*b^13 - 28*a^2*b^12 + (315*a^3*b^11)/2 - (987*a^4*b^10)/2 + 978*a^5*b^9 - 1302*a^6*b^8 + 1197*a^
7*b^7 - 765*a^8*b^6 + 336*a^9*b^5 - 98*a^10*b^4 + (35*a^11*b^3)/2 - (3*a^12*b^2)/2)/(9*a^10*b - a^11 + a^2*b^9
- 9*a^3*b^8 + 36*a^4*b^7 - 84*a^5*b^6 + 126*a^6*b^5 - 126*a^7*b^4 + 84*a^8*b^3 - 36*a^9*b^2) + (tan(c + d*x)*
(7*a - b)*(-a^3*b^5)^(1/2)*(256*a^2*b^11 - 1792*a^3*b^10 + 5120*a^4*b^9 - 7168*a^5*b^8 + 3584*a^6*b^7 + 3584*a
^7*b^6 - 7168*a^8*b^5 + 5120*a^9*b^4 - 1792*a^10*b^3 + 256*a^11*b^2))/(128*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^
3 + 6*a^5*b^2)*(a^8 - 6*a^7*b + a^2*b^6 - 6*a^3*b^5 + 15*a^4*b^4 - 20*a^5*b^3 + 15*a^6*b^2))))/(4*(a^7 - 4*a^6
*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2)))*(7*a - b)*(-a^3*b^5)^(1/2))/(4*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 +
6*a^5*b^2))))*(7*a - b)*(-a^3*b^5)^(1/2)*1i)/(2*d*(a^7 - 4*a^6*b + a^3*b^4 - 4*a^4*b^3 + 6*a^5*b^2))